<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script>
	$(document).ready(function(){
		$("#main_logo").click(function(){
			location.href="${initParam.root}";
		});
		$("#homeBtn").click(function(){
			location.href="${initParam.root}";
		});
		$("#search").click(function(){
			location.href="${initParam.root}mypage/searchForm.do";
		});
		$("#meBtn").click(function(){
			location.href="${initParam.root}auth_myinfo.do";
		});
		$(".pubtable").children().click(function(){
			if(${sessionScope.loginMember!=null}){
			location.href="${initParam.root}public/auth_detailBoard.do?no="
					+$(this).children().children().eq(0).text();
			}
		});
		$(".diarytable").children().click(function(){
			if(${sessionScope.loginMember!=null}){
			location.href="${initParam.root}mypage/auth_diaryList.do";
			}
		});
		$(".corrtable").children().click(function(){
			if(${sessionScope.loginMember!=null}){
			location.href="${initParam.root}collection/auth_detailCollectionHitPlus.do?no="
					+$(this).children().children().eq(0).text();
			}
		});
	});
</script>
<!-- <style type="text/css">
p {
	text-align: center;
	vertical-align: middle;
}
#header_search{
	padding: 5px; /* 내용과 테두리 사이 간격 할당 */
	text-align: center;
	width: 99%;
	border-bottom: 1px solid silver;
}
.point :hover{
	cursor: pointer;
}
</style> -->
<div id="total">
<h4>공유게시판 검색결과</h4>
<c:choose>
	<c:when test="${requestScope.map.binfo!=null}">
		&nbsp; ${requestScope.map.binfo}
	<br><br><br></c:when>
<c:otherwise>
<c:forEach var="bvo" items="${requestScope.map.blist}">
	<table width="550" style="word-wrap: break-word; table-layout: fixed" class="pubtable">		
			<tr class="point">
			    <td align="left" width="100">${bvo.no}</td>			
				<td align="left">${bvo.title}</td>
				<td align="right">${bvo.date}</td>
			</tr>
	</table>
</c:forEach>
<br>
<a href="${initParam.root}public/searchPublicBoardListByTitleAndContent.do?word=${requestScope.map.bword}" style="margin-left: 82%; font-size: 8pt">더보기</a>
<br>
</c:otherwise>
</c:choose>
<hr>
<br>

<c:if test="${sessionScope.loginMember!=null}">
<h4>다이어리 검색결과</h4>
<c:choose>
	<c:when test="${requestScope.map.dinfo!=null}">
		&nbsp; ${requestScope.map.dinfo}
	<br><br><br></c:when>
	<c:otherwise>
	<c:forEach var="dvo" items="${requestScope.map.dlist}">
	<table width="550" style="word-wrap: break-word; border: 1px solid silver; table-layout: fixed;" class="diarytable">		
			<tr class="point">
			    <td align="left" width="100">${dvo.no}</td>				
				<td align="left">${dvo.date}</td>
				<td align="right">
				<c:if test="${dvo.orgfilename!=null}">
				첨부파일: ${dvo.orgfilename}
				 </c:if>
				</td>
			</tr>
			<tr class="point">
			<td colspan="3"><pre width="500" style="width:100%; height:80%; overflow:auto;">${dvo.content}</pre></td>
			</tr>
	</table>
	<br>
</c:forEach>
<br>
<a href="${initParam.root}mypage/auth_searchDiaryByContent.do?word=${requestScope.map.dword}&page=1" style="margin-left: 82%; font-size: 8pt">더보기</a>
<br>
</c:otherwise>
</c:choose>
<hr>
<br>
</c:if>

<h4>자기소개서 검색결과</h4>
<c:choose>
	<c:when test="${requestScope.map.cinfo!=null}">
		&nbsp; ${requestScope.map.cinfo}
	<br><br><br></c:when>
<c:otherwise>
<c:forEach var="cvo" items="${requestScope.map.clist}">
	<table width="550" style="word-wrap: break-word; table-layout: fixed" class="corrtable">		
			<tr class="point">
			    <td align="left" width="100">${cvo.no}</td>			
				<td align="left">${cvo.title}</td>
				<td align="right">${cvo.date}</td>
			</tr>
	</table>
</c:forEach>
<br>
<br>
<a href="${initParam.root}collection/findCollectionByTitleAndContent.do?word=${requestScope.map.cword}&page=1" style="margin-left: 82%; font-size: 8pt">더보기</a>
<br>
</c:otherwise>
</c:choose>
<hr>
</div>
